<%@ page language="java" contentType="text/html; charset=UTF-8"
  import="com.baidu.ueditor.ActionEnter"
    pageEncoding="UTF-8"%>
    
<%@ page trimDirectiveWhitespaces="true" %>
<%
      response.setHeader("Access-Control-Allow-Origin","*");
      System.out.println("request== 8081");
      //response.setHeader("Access-Control-Allow-Headers", "Range");
      //request.setCharacterEncoding( "utf-8" );
    //response.setHeader("Content-Type" , "text/html");
  
    String rootPath = application.getRealPath( "/" );
      //response.addHeader("Access-Control-Allow-Origin", "*");
    // System.out.println("response=="+response.getHeader("Access-Control-Allow-Origin"));
    // Access-Control-Allow-Headers' 'Range
    //System.out.println("request=="+request.getMethod());
      if (request.getHeader("Access-Control-Request-Method") != null && "OPTIONS".equals(request.getMethod())) {
          System.out.println("Sending Header  OPTIONS....");
          // CORS "pre-flight" request
          response.addHeader("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE");
          response.addHeader("Access-Control-Allow-Headers", "Authorization");
          response.addHeader("Access-Control-Allow-Headers", "Content-Type");
          response.addHeader("Access-Control-Max-Age", "1");
      }
      //filterChain.doFilter(request, response);
      
  //System.out.println("Sending Header  end ....");
  //out.write("<script type='text/javascript'>document.domain = 'ezhensuo.com'</script>");
  out.write( new ActionEnter( request, rootPath ).exec() );
  
%>